package com.yq.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.ouyeel.service.YqTestService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * Created by lenovo on 2017-10-16.
 */
@Controller
@RequestMapping("/test")
public class TestController {
    @Reference
    private YqTestService service;

    @RequestMapping("/1")
    @ResponseBody
    public String testMethod(){
        return "测试内容";
    }

    @RequestMapping("/2")
    @ResponseBody
    public String testDubbo(){
        return service.test();
    }
}
